﻿using System;
using Assist;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using YJKView;

namespace Balcony
{
	[Regeneration(RegenerationOption.Manual)]
	[Transaction(TransactionMode.Manual)]
	[Journaling(JournalingMode.NoCommandData)]
	public class CreateBalcony : YJKCommandManual
	{
		protected override Result YJKExcute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			CmdViewType types = (CmdViewType)3;
			if (SwitchView.SetUsableView(types, commandData) != Autodesk.Revit.UI.Result.Succeeded)
			{
				return Autodesk.Revit.UI.Result.Failed;
			}
			BalconyManager balconyManager = new BalconyManager(commandData);
			return balconyManager.Create();
		}
	}
}
